package sdk.webview.fmc.com.fmcsdk.base;

import okhttp3.RequestBody;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;
import retrofit2.http.Url;
import rx.Observable;
import sdk.webview.fmc.com.fmcsdk.bean.UploadImage;

/**
 * Created by ydm on 2018/7/13.
 */

public  interface H5Api {
    /**
     * 上传图片到后台仓库
     * @param url
     * @param accessToken
     * @param file 文件流
     * @return
     */
    @Multipart
    @POST
    Observable<UploadImage> uploadImgForClient(@Url String url,
                                               @Query("accessToken") String accessToken,
                                               @Part("files\"; filename=\"image.png\"") RequestBody file
    );
}
